package com.mybatis;

import com.mybatis.config.MybatisConfig;
import com.mybatis.mapper.UserMapper;
import com.mybatis.pojo.User;
import com.mybatis.service.UserService;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

import java.util.LinkedList;
import java.util.List;

public class MainClass {
	public static void main(String[] args) {
		AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(MybatisConfig.class);
		UserMapper userService= context.getBean(UserMapper.class);
		User users = userService.selectUserByAge(18);
		User users2 = userService.selectUserByAge(18);

		System.out.println(users);
		System.out.println(users2);
	}
}
